package com.lwc.cfdns.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.lwc.cfdns.pojo.bo.system.AdminBO;
import com.lwc.cfdns.pojo.dto.ChangeStatusDTO;
import com.lwc.cfdns.pojo.dto.system.AdminDTO;
import com.lwc.cfdns.pojo.dto.system.AdminLoginDTO;
import com.lwc.cfdns.pojo.dto.system.AdminPwdDTO;
import com.lwc.cfdns.pojo.entity.SystemAdmin;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lwc.cfdns.pojo.vo.system.AdminLoginVO;
import com.lwc.cfdns.pojo.vo.system.AdminVO;

import java.util.List;
import java.util.Map;

/**
 * @author spring
 * @description 针对表【cfdns_system_admin(用户信息表)】的数据库操作Service
 * @createDate 2023-05-23 13:39:11
 */
public interface SystemAdminService extends IService<SystemAdmin> {

    /**
     * 权限
     *
     * @param admin_id
     * @return List<String>
     * @throws
     * @version 1.0.0
     * @author luwc
     * @time 2023/5/16 11:39:51
     */
    List<String> getPermissionsByUserId(Long admin_id);

    /**
     * 登录
     *
     * @param adminLoginDTO
     * @return AdminLoginVO
     * @throws
     * @version 1.0.0
     * @author luwc
     * @time 2023/5/23 13:46:14
     */
    AdminLoginVO login(AdminLoginDTO adminLoginDTO);

    /**
     * 退出
     *
     * @param
     * @return void
     * @throws
     * @version 1.0.0
     * @author luwc
     * @time 2023/5/23 13:46:05
     */
    void logout();

    /**
     * 创建
     *
     * @param adminDTO
     * @return Map<String, Object>
     * @throws
     * @version 1.0.0
     * @author luwc
     * @time 2023/5/24 10:42:56
     */
    Map<String, Object> create(AdminDTO adminDTO);

    /**
     * 详情
     *
     * @param id
     * @return AdminVO
     * @throws
     * @version 1.0.0
     * @author luwc
     * @time 2023/5/24 10:45:27
     */
    AdminVO view(Long id);

    /**
     * 更新
     *
     * @param id
     * @param adminDTO
     * @return Map<String, Object>
     * @throws
     * @version 1.0.0
     * @author luwc
     * @time 2023/5/24 10:54:53
     */
    Map<String, Object> update(Long id, AdminDTO adminDTO);

    /**
     * 删除
     *
     * @param id
     * @return Map<String, Object>
     * @throws
     * @version 1.0.0
     * @author luwc
     * @time 2023/5/24 10:59:04
     */
    Map<String, Object> delete(String id);

    /**
     * 列表
     *
     * @param adminBO
     * @return IPage<AdminVO>
     * @throws
     * @version 1.0.0
     * @author luwc
     * @time 2023/5/24 11:04:09
     */
    IPage<SystemAdmin> lists(AdminBO adminBO);

    /**
     * 状态修改
     *
     * @param changeStatusDTO
     * @return Map<String, Object>
     * @throws
     * @version 1.0.0
     * @author luwc
     * @time 2023/5/29 22:32
     */
    Map<String, Object> changeStatus(ChangeStatusDTO changeStatusDTO);

    /**
     * 修改密码
     *
     * @param adminDTO
     * @return Map<String, Object>
     * @throws
     * @version 1.0.0
     * @author luwc
     * @time 2023/5/29 22:48
     */
    Map<String, Object> resetPwd(AdminDTO adminDTO);

    /**
     * 修改当前用户资料
     *
     * @param adminDTO
     * @return Map<String, Object>
     * @throws
     * @version 1.0.0
     * @author luwc
     * @time 2023/5/29 23:10
     */
    Map<String, Object> profile(AdminDTO adminDTO);

    /**
     * 修改当前用户密码
     *
     * @param adminPwdDTO
     * @return Map<String, Object>
     * @throws
     * @version 1.0.0
     * @author luwc
     * @time 2023/5/29 23:17
     */
    Map<String, Object> profileResetPwd(AdminPwdDTO adminPwdDTO);

    /**
     * 修改当前用户头像
     *
     * @param imageUrl
     * @return Map<String, Object>
     * @throws
     * @version 1.0.0
     * @author luwc
     * @time 2023/6/7 20:28
     */
    Map<String, Object> profileAvatar(String imageUrl);
}
